<template>
	<el-row :gutter="20" justify="end">
		<el-col :span="6">
			<el-button class="submit-btn" type="primary" @click="newForm" style="width: 100%;">提交</el-button>
		</el-col>
		<el-col :span="6">
			<el-button class="submit-btn" type="info" @click="resetForm" style="width: 100%;">重置</el-button>
		</el-col>
	</el-row>
</template>

<script>
	export default {
		methods: {
			// 提交表单
			newForm() {
				let self = this;
				self.$confirm('是否要提交信息？', '确认信息', {
						distinguishCancelAndClose: true,
						confirmButtonText: '确定提交',
						cancelButtonText: '不',
						showClose: false,
						closeOnClickModal: false
					})
					.then(() => {
						self.$emit('getChildNewForm');
					})
					.catch(() => {});
			},
			// 重置表单
			resetForm() {
				let self = this;
				self.$confirm('是否要重置表单？', '确认信息', {
						distinguishCancelAndClose: true,
						confirmButtonText: '确定重置',
						cancelButtonText: '点错了',
						showClose: false,
						closeOnClickModal: false
					})
					.then(() => {
						self.$emit('getChildResetForm');
					})
					.catch(() => {});
			}
		}
	}
</script>

<style>
</style>
